﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DoanhNghiep/DoanhNghiepSite.Master" AutoEventWireup="true" CodeBehind="ChiTietDonHang.aspx.cs" Inherits="PTUDW_TH2009_A4_GroupOn.DoanhNghiep.WebForm7" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label ID="Label1" runat="server" Text="Nhập tên voucher cần tìm"></asp:Label>
&nbsp;
    <asp:DropDownList ID="ddlVoucherList" runat="server" 
        AppendDataBoundItems="True" AutoPostBack="True">
    </asp:DropDownList>
&nbsp;
    <br />
    <br />
    <asp:Label ID="Label2" runat="server" 
        Text="Chi tiết các đơn hàng của voucher vừa chọn"></asp:Label>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="LANGIAOHANGTHU,MADH,VOUCHERDH" 
        DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
        AutoGenerateDeleteButton="True" AutoGenerateEditButton="True">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="VOUCHERDH" HeaderText="Mã Voucher" ReadOnly="True" 
                SortExpression="VOUCHERDH" />
            <asp:BoundField DataField="MADH" HeaderText="Mã đơn hàng" ReadOnly="True" 
                SortExpression="MADH" />
            <asp:BoundField DataField="LANGIAOHANGTHU" HeaderText="Lần giao hàng thứ" 
                ReadOnly="True" SortExpression="LANGIAOHANGTHU" />
            <asp:BoundField DataField="SOLUONGMUA" HeaderText="Số lượng đã mua" 
                SortExpression="SOLUONGMUA" />
            <asp:BoundField DataField="NGAYGIAOHANG" HeaderText="Ngày giao hảng" 
                SortExpression="NGAYGIAOHANG" />
            <asp:BoundField DataField="TRANGTHAIGIAOHANG" HeaderText="Trạng thái giao hàng" 
                SortExpression="TRANGTHAIGIAOHANG" />
            <asp:BoundField DataField="TRANGTHAISUDUNG" HeaderText="Trạng thái sử dụng" 
                SortExpression="TRANGTHAISUDUNG" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MuaChungConnectionString %>" 
        OldValuesParameterFormatString="original_{0}" 
        
        SelectCommand="SELECT * FROM [ChiTietDonHang] WHERE ([VOUCHERDH] = @VOUCHERDH)">
        <SelectParameters>
            <asp:ControlParameter ControlID="ddlVoucherList" Name="VOUCHERDH" 
                PropertyName="SelectedValue" Type="Int32" DefaultValue="NULL" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
</asp:Content>
